
#include "CPlusObject.h"
#include "SafeWall.h"

void* __cdecl operator new(size_t size) {
    OUTPUT("Global operator new");
    OUTPUT("Allocate size:%d", size);
    return ExAllocatePoolWithTag(NonPagedPool, size, 'plus');
}

void __cdecl operator delete(void* pointer) {
    OUTPUT("Global delete operator");
    ExFreePoolWithTag(pointer, 'plus');
}

CPlusObject::CPlusObject() {};
CPlusObject::~CPlusObject() {};

void* CPlusObject::operator new(size_t size) {
    OUTPUT("Global CPlusObject::operator new");
    OUTPUT("CPlusObject::Allocate size:%d", size);
    return ExAllocatePool(PagedPool, size);
}

void CPlusObject::operator delete(void* pointer) {
    OUTPUT("Global CPlusObject::delete operator");
    ExFreePool(pointer);
}
